﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DTOSingTowerMall
{
    partial class EventHallBooking
    {
        private bool isValid = true;
        private string errorMessage = string.Empty;

        public bool IsValid
        {
            get { return isValid; }
        }

        public string ErrorMessage
        {
            get { return errorMessage; }
        }

        partial void OnEventTitleChanging(string value)
        {
            // passenger name should not be empty
            if (value == String.Empty)
            {
                isValid = false;
                errorMessage += "Event Title cannot be blank " + Environment.NewLine;
            }
        }

        partial void OnEventDescriptionChanging(string value)
        {
            // passenger name should not be empty
            if (value == String.Empty)
            {
                isValid = false;
                errorMessage += "Event Description cannot be blank " + Environment.NewLine;
            }
        }

        partial void OnIdentityNoChanging(string value)
        {
            // passenger name should not be empty
            if (value == String.Empty)
            {
                isValid = false;
                errorMessage += "NRIC/Identity number cannot be blank " + Environment.NewLine;
            }
        }



    }
}
